| hwg-software archives | Mar 1999 | new search | results | previous | next |
Re: formatting html codeby Kayla Block <kblock(at)placeware.com> |
|
>Does anyone know of a clear explanation
>(either in a book or on the web) concerning
>how to format html properly?
I haven't seen this documented anywhere and much of it seems to be
idiosyncratic. But one of my co-workers writes the most beautiful html I've
ever seen so I have learned to use his as a role model. (He also writes the
prettiest Java and Javascript code I've ever seen.)
He uses an indent space of 2 for html. (Other programming languages usually
use 4 but the nature of html makes an indent of 4 unwieldy.) Any container
tags are on their own separate line. The contents between the open and
close tag are on a separate line and also indented by 2 spaces. This way of
writing html usually makes problems become pretty obvious.
I can type in an example better than I can explain it:
<table>
<tr>
<td>
<font size="+1">
<b>
Here is some text.
</b>
</font>
</td>
<td>
Here is some more text.
</td>
</tr>
<tr>
<td>
And yet more text.
</td>
</tr>
</table>
Kayla
HWG: hwg-software mailing list archives, maintained by Webmasters @ IWA